#!/bin/sh

# remove old test domain
#rm -f default.db
#rm -f log

#../edb -S -P edb.pid -r ../lua/test1.lua > log &
#curl http://0.0.0.0:8080/
# stop edb
#kill -s INT `cat edb.pid`


# run test #3 with simpledb sync disabled:
# ################################################
# remove old test domain
rm -f default.db
rm -f log

# start edb
../edb -S -P edb.pid > log &

# do tests
./test3.py 

# stop edb
kill -s INT `cat edb.pid`

ls -l default.db

# run tests with simpledb sync disabled:
# ################################################
# remove old test domain
rm -f default.db
rm -f log

# start edb
../edb -S -P edb.pid > log &

# do tests
./test1.py
./test2.py

# stop edb
kill -s INT `cat edb.pid`

# run tests with simpledb sync and memory file enabled:
# ################################################
# remove old test domain
rm -f default.db
rm -f log

# start edb
../edb -M -S -P edb.pid > log &

# do tests
./test1.py
./test2.py

# stop edb
kill -s INT `cat edb.pid`

# run compact database file tests:
# ################################################
# remove old test domain
rm -f default.db
rm -f log
rm -f compacted.db

# start edb
../edb -S -P edb.pid > log &

# do some inserts and deletes:
./test_compact_setup.py

# stop edb
kill -s INT `cat edb.pid`

# compact the database:
../edb -n default.db -c compacted.db > log &

# run db on newly compacted database file:
../edb -n compacted.db -S -P edb.pid > log &

# check the compacted database file:
./test_compact_check.py

# stop edb
kill -s INT `cat edb.pid`

# run tests with simpledb sync enabled:
# ################################################

# remove old test domain
rm -f default.db
rm -f log

# start edb
../edb -P edb.pid > log &

# do tests
./test1.py
./test2.py

# stop edb
kill -s INT `cat edb.pid`



